package sample.asphalt2.control
{
	import asphalt2.control.AbstractControl;
	import asphalt2.processor.PopupCloseProcessor;
	import asphalt2.validator.IValidateError;
	import asphalt2.validator.ValidateError;
	
	import flash.events.MouseEvent;
	
	import sample.ProjectNumberingInputPage;
	import asphalt2.processor.ValidatePopupCloseProcessor;
	
	public class ProjectNumberingInputControl extends AbstractControl
	{
		private var page:ProjectNumberingInputPage;
		
		override public function setup():void{
			page = ProjectNumberingInputPage(UI);
			
			page.okButton.addEventListener(MouseEvent.CLICK,new ValidatePopupCloseProcessor(this).handle);
			page.cancelButton.addEventListener(MouseEvent.CLICK,new PopupCloseProcessor(this).handle);
		}
		
		public function validate():IValidateError{
			//エラーチェック
			var error:ValidateError = new ValidateError();
			error.addError("エラーチェック",page.projectNameTextInput);
			return error;
		}
		public function storeToSession():void{}
		public function finalize():void{}
	}
}